import pytest
from selenium import webdriver
from pages.index import Index

@pytest.fixture
def driver():
    print("=== 启动浏览器 ===")
    driver = webdriver.Chrome()
    driver.implicitly_wait(5)
    yield driver
    print("=== 关闭浏览器 ===")
    driver.quit()

@pytest.fixture
def index(driver):
    print("=== index ===")
    return Index(driver)